﻿using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClothingShopping.Data
{
    /// <summary>
    /// 用户组表
    /// </summary>
    [JsonObject(MemberSerialization.OptIn),Table(DisableSyncStructure= false)]
    public class UserGroup
    {
        /// <summary>
        /// 用户组id
        /// </summary>
        [JsonProperty, Column(DbType ="INT",IsIdentity = true, IsPrimary = true)]
        public int TgId { get; set; }

        /// <summary>
        /// 组名称
        /// </summary>
        [JsonProperty, Column(DbType ="NVARCHAR(20)")]
        public string? TgName { get; set;}

        /// <summary>
        /// 父组id
        /// </summary>
        [JsonProperty, Column(DbType ="INT")]
        public int ParentTgId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [JsonProperty, Column(DbType ="NVARCHAR(200)")]
        public string? Remark { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [JsonProperty, Column(DbType = "NVARCHAR(20)")]
        public string? Creator { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [JsonProperty, Column(DbType = "DATETIME")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [JsonProperty, Column(DbType = "NVARCHAR(20)")]
        public string? Modifier { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [JsonProperty, Column(DbType = "DATETIME")]
        public DateTime? MTime { get; set; }
    }
}
